package com.yitao.cms.enums;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Auther: wuwenlong
 * @Date: 2018/6/11 0011 17:02
 * @Description:用户状态(与权限状态共用一个)
 */
public class UserStateEnums {

    public enum UserStateEnum {
        /* 禁用 */
        DISABLE(0, "禁用"),
        /* 启用 */
        ENABLE(1, "启用");

        private final Integer code;
        private final String name;

        UserStateEnum(Integer code, String name) {
            this.code = code;
            this.name = name;
        }

        public Integer getCode() {
            return code;
        }

        public String getName() {
            return name;
        }
        public static String getDescByCode(String Code){
            for (UserStateEnums.UserStateEnum e : UserStateEnums.UserStateEnum.values()) {
                if (e.getCode() .equals(Code) ){
                    return e.getName();
                }
            }
            return null;
        }

    }
    public enum LoginStateEnum {
        /* 未登录 */
        NO("0", "未登录"),
        /* 启用 */
        YES("1", "已登录");

        private final String code;
        private final String name;

        LoginStateEnum(String code, String name) {
            this.code = code;
            this.name = name;
        }

        public String getCode() {
            return code;
        }

        public String getName() {
            return name;
        }
    }
    public enum deleteStateEnum {

        NO(0, "未删除"),
        YES(1, "已删除");

        private final Integer code;
        private final String name;

        deleteStateEnum(Integer code, String name) {
            this.code = code;
            this.name = name;
        }

        public Integer getCode() {
            return code;
        }

        public String getName() {
            return name;
        }
    }
}
